ci: hash-pin pip deps + pin wasmtime (Scorecard Pinned-Dependencies) - #58
Conversation
Clears the hashable Pinned-Dependencies findings: - wasmtime: replace 'curl | bash' of the unpinned install script with a pinned release download (v45.0.0) + sha256 verification (the one genuine finding). - pip test/tool deps: hash-pin pytest/numpy/maturin (ordvec-python/requirements-dev.txt via 'uv pip compile --universal --generate-hashes --python-version 3.9') and zizmor (.github/zizmor-requirements.txt), installed with 'pip install --require-hashes -r' in python.yml, release-python.yml, and zizmor.yml. The remaining 'pip install dist/*.whl|*.tar.gz' lines install freshly-built local artifacts (no stable hash) and are dismissed in code scanning by design. Verified: zizmor --offline clean, actionlint clean (incl. shellcheck on the wasmtime step), YAML valid. Requirements files are Dependabot-maintained.
Review Summary by QodoPin pip and wasmtime dependencies for supply chain security
WalkthroughsDescription• Replace unpinned wasmtime install script with pinned v45.0.0 release + SHA256 verification • Hash-pin pytest, numpy, maturin dependencies via requirements-dev.txt file • Hash-pin zizmor workflow audit tool via dedicated requirements file • Update CI workflows to use pip install --require-hashes for dependency verification Diagramflowchart LR
A["Unpinned Dependencies"] -->|"Replace curl bash"| B["Pinned wasmtime v45.0.0"]
A -->|"Hash-pin via uv"| C["requirements-dev.txt"]
A -->|"Hash-pin via uv"| D["zizmor-requirements.txt"]
B -->|"SHA256 verification"| E["Supply Chain Security"]
C -->|"pip --require-hashes"| E
D -->|"pip --require-hashes"| E
File Changes1. .github/workflows/ci.yml
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Code Review
This pull request adds two new requirements files containing hash-pinned dependencies to satisfy OpenSSF Scorecard Pinned-Dependencies checks. Specifically, it introduces .github/zizmor-requirements.txt for the zizmor workflow-audit CI job and ordvec-python/requirements-dev.txt for the ordvec-python development and testing environment. There are no review comments, and I have no feedback to provide.
The wasmtime download hardcoded the x86_64-linux tarball, so the wasm job would fail if its runner were ever switched to ARM Ubuntu. Derive the arch from `uname -m` and select the matching tarball + pinned sha256 (x86_64 and aarch64), erroring out on anything else. Preserves the curl|bash -> pinned download hardening.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Clears the hashable OpenSSF Scorecard Pinned-Dependencies alerts (#1–#4, #6).
curl | bashof the unpinned install script in the wasm job with a pinned release download (v45.0.0) +sha256sum -cverification.ordvec-python/requirements-dev.txt, generated byuv pip compile --universal --generate-hashes --python-version 3.9so one file covers the 3.9–3.13 × OS matrix via environment markers) and zizmor (.github/zizmor-requirements.txt); installed withpip install --require-hashes -r …inpython.yml,release-python.yml, andzizmor.yml.#5 (
pip install dist/*.tar.gz) installs the freshly-built local sdist — no stable hash by design — so it's dismissed in code scanning rather than fixed.Verified locally:
zizmor --offlineclean,actionlintclean (incl. shellcheck on the new wasmtime step), YAML valid. Requirements files are Dependabot-maintained.